Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  Monitor  Printer  Status  

 Content of Monitor Printer Status.vbs
MD5 Hash: 19806DC04C0E4732C69E8BD9EBDB6A6E
' Description: Checks the status for each printer on a computer, and issues an alert if any of these printers have stopped.


strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colInstalledPrinters = objWMIService.ExecQuery _
("Select * from Win32_Printer Where PrinterStatus = '1' " _
& "or PrinterStatus = '2'")

If colInstalledPrinters.Count = 0 Then
Wscript.Echo "All printers are functioning correctly."
Else
For Each objPrinter in colInstalledPrinters
Wscript.Echo "Printer " & objprinter.Name & " is not responding."
Next
End If

   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a